package cn.usian.basicInformation.car.controller;

import cn.usian.basicInformation.car.service.ICarEnergyService;
import cn.usian.pojo.Result;
import cn.usian.pojo.basicInformation.car.CarEnergy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/carEnergy")
public class CarEnergyController {
    @Autowired
    private ICarEnergyService carEnergyService;

    @GetMapping("/list")
    public Result list() {
        List<CarEnergy> carEnergyList = carEnergyService.list();
        return Result.ok(carEnergyList);
    }

}
